/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.anism.service;

import java.util.Date;
import javax.ejb.EJB;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.ejb.Stateless;
import org.anism.API.HolidayInputLocal;
import org.anism.entity.Employee;
import org.anism.entity.HolidayRequest;

/**
 *
 * @author tgqm5519
 */
@WebService(serviceName = "HolidayInputService")
@Stateless()
public class HolidayInputService {
    @EJB
    private HolidayInputLocal ejbRef;// Add business logic below. (Right-click in editor and choose
    // "Insert Code > Add Web Service Operation")

    @WebMethod(operationName = "authenticate")
    public Employee authenticate(@WebParam(name = "employeeId") String employeeId, @WebParam(name = "password") String password) {
        return ejbRef.authenticate(employeeId, password);
    }

    @WebMethod(operationName = "addHolidayRequest")
    public HolidayRequest addHolidayRequest(@WebParam(name = "employee") String employeeId, @WebParam(name = "startDate") Date startDate, @WebParam(name = "endDate") Date endDate, @WebParam(name = "type") String type) {
        return ejbRef.addHolidayRequest(employeeId, startDate, endDate, type);
    }
    
}
